import service from '@/utils/request'

// @Tags ProductSpecAccessorySpec
// @Summary 创建产品规格-配件规格清单
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.ProductSpecAccessorySpec true "创建产品规格-配件规格清单"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /productSpecAccessorySpec/createProductSpecAccessorySpec [post]
export const createProductSpecAccessorySpec = (data) => {
  return service({
    url: '/productSpecAccessorySpec/createProductSpecAccessorySpec',
    method: 'post',
    data
  })
}

// @Tags ProductSpecAccessorySpec
// @Summary 删除产品规格-配件规格清单
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.ProductSpecAccessorySpec true "删除产品规格-配件规格清单"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /productSpecAccessorySpec/deleteProductSpecAccessorySpec [delete]
export const deleteProductSpecAccessorySpec = (params) => {
  return service({
    url: '/productSpecAccessorySpec/deleteProductSpecAccessorySpec',
    method: 'delete',
    params
  })
}

// @Tags ProductSpecAccessorySpec
// @Summary 批量删除产品规格-配件规格清单
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除产品规格-配件规格清单"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /productSpecAccessorySpec/deleteProductSpecAccessorySpec [delete]
export const deleteProductSpecAccessorySpecByIds = (params) => {
  return service({
    url: '/productSpecAccessorySpec/deleteProductSpecAccessorySpecByIds',
    method: 'delete',
    params
  })
}

// @Tags ProductSpecAccessorySpec
// @Summary 更新产品规格-配件规格清单
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.ProductSpecAccessorySpec true "更新产品规格-配件规格清单"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /productSpecAccessorySpec/updateProductSpecAccessorySpec [put]
export const updateProductSpecAccessorySpec = (data) => {
  return service({
    // url: '/productSpecAccessorySpec/updateProductSpecAccessorySpec',
    url: '/productSpecAccessorySpec/updateProductSpecAccessorySpecWithMapList',
    donNotShowLoading: true,
    method: 'put',
    data
  })
}

// @Tags ProductSpecAccessorySpec
// @Summary 用id查询产品规格-配件规格清单
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.ProductSpecAccessorySpec true "用id查询产品规格-配件规格清单"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /productSpecAccessorySpec/findProductSpecAccessorySpec [get]
export const findProductSpecAccessorySpec = (params) => {
  return service({
    url: '/productSpecAccessorySpec/findProductSpecAccessorySpec',
    method: 'get',
    params
  })
}

// @Tags ProductSpecAccessorySpec
// @Summary 分页获取产品规格-配件规格清单列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取产品规格-配件规格清单列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /productSpecAccessorySpec/getProductSpecAccessorySpecList [get]
export const getProductSpecAccessorySpecList = (params) => {
  return service({
    url: '/productSpecAccessorySpec/getProductSpecAccessorySpecList',
    method: 'get',
    params
  })
}
